import React, { Component, Fragment } from "react";
// antd
import { Tabs } from "antd";
// API
// import { AliyunEcsAddApi } from "@/api/raycloud";
import { requestData } from "@api/common";
// url
import requestUrl from "@api/requestUrl";
// 组件
// import FormCom from "@c/form/Index";
import StepDemo from "./components/step";
import StepPro from "./components/steppro";

const { TabPane } = Tabs;

class EcsAdd extends Component {
    constructor(props){
        super(props);
        this.state = {
        };
    }

    componentDidMount(){
        this.getSelectList();
    }


    // 请求数据
    getSelectList = () => {
        const data = {
            url: requestUrl["getDepartmentList"]
        }
        // 不存在 url 时，阻止
        if(!data.url) { return false; }
        // 接口
        requestData(data).then(response => {
            this.setState({
                select: response.data.data.data
            })
        })
    }

    render(){
        return (
            <Fragment>
              <Tabs defaultActiveKey="1">
                <TabPane tab="阿里云" key="1">
                    <StepPro></StepPro>
                </TabPane>
                <TabPane tab="腾讯云" key="2">
                    <StepDemo></StepDemo>
                </TabPane>
                <TabPane tab="机器录入" key="3">
                </TabPane>
              </Tabs>
          </Fragment>
        )
    }
}
export default EcsAdd;
